/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package escr.persistencia;

import java.io.Serializable;
import java.util.Collection;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author Aditardo
 */
@Entity
@Table(name = "financiador")
@NamedQueries({@NamedQuery(name = "Financiador.findByFinCod", query = "SELECT f FROM Financiador f WHERE f.finCod = :finCod"), @NamedQuery(name = "Financiador.findByFinCedula", query = "SELECT f FROM Financiador f WHERE f.finCedula = :finCedula"), @NamedQuery(name = "Financiador.findByFinNombre", query = "SELECT f FROM Financiador f WHERE f.finNombre = :finNombre"), @NamedQuery(name = "Financiador.findByFinDireccion", query = "SELECT f FROM Financiador f WHERE f.finDireccion = :finDireccion"), @NamedQuery(name = "Financiador.findByFinTelefono", query = "SELECT f FROM Financiador f WHERE f.finTelefono = :finTelefono"), @NamedQuery(name = "Financiador.findByFinCelular", query = "SELECT f FROM Financiador f WHERE f.finCelular = :finCelular"), @NamedQuery(name = "Financiador.findByFinContacto", query = "SELECT f FROM Financiador f WHERE f.finContacto = :finContacto"), @NamedQuery(name = "Financiador.findByFinTfnocontac", query = "SELECT f FROM Financiador f WHERE f.finTfnocontac = :finTfnocontac"), @NamedQuery(name = "Financiador.findByFinCiudad", query = "SELECT f FROM Financiador f WHERE f.finCiudad = :finCiudad"), @NamedQuery(name = "Financiador.findByFinPais", query = "SELECT f FROM Financiador f WHERE f.finPais = :finPais"), @NamedQuery(name = "Financiador.findByFinFecha", query = "SELECT f FROM Financiador f WHERE f.finFecha = :finFecha"), @NamedQuery(name = "Financiador.findByFinEstado", query = "SELECT f FROM Financiador f WHERE f.finEstado = :finEstado")})
public class Financiador implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Column(name = "FIN_COD", nullable = false)
    private Integer finCod;
    @Column(name = "FIN_CEDULA")
    private String finCedula;
    @Column(name = "FIN_NOMBRE")
    private String finNombre;
    @Column(name = "FIN_DIRECCION")
    private String finDireccion;
    @Column(name = "FIN_TELEFONO")
    private String finTelefono;
    @Column(name = "FIN_CELULAR")
    private String finCelular;
    @Column(name = "FIN_CONTACTO")
    private String finContacto;
    @Column(name = "FIN_TFNOCONTAC")
    private String finTfnocontac;
    @Column(name = "FIN_CIUDAD")
    private String finCiudad;
    @Column(name = "FIN_PAIS")
    private String finPais;
    @Column(name = "FIN_FECHA")
    @Temporal(TemporalType.DATE)
    private Date finFecha;
    @Column(name = "FIN_ESTADO")
    private Integer finEstado;
    @OneToMany(mappedBy = "finCod")
    private Collection<Documento> documentoCollection;
    @JoinColumn(name = "TIP_COD", referencedColumnName = "TIP_COD")
    @ManyToOne
    private TipoFinanciador tipCod;

    public Financiador() {
    }

    public Financiador(Integer finCod) {
        this.finCod = finCod;
    }

    public Integer getFinCod() {
        return finCod;
    }

    public void setFinCod(Integer finCod) {
        this.finCod = finCod;
    }

    public String getFinCedula() {
        return finCedula;
    }

    public void setFinCedula(String finCedula) {
        this.finCedula = finCedula;
    }

    public String getFinNombre() {
        return finNombre;
    }

    public void setFinNombre(String finNombre) {
        this.finNombre = finNombre;
    }

    public String getFinDireccion() {
        return finDireccion;
    }

    public void setFinDireccion(String finDireccion) {
        this.finDireccion = finDireccion;
    }

    public String getFinTelefono() {
        return finTelefono;
    }

    public void setFinTelefono(String finTelefono) {
        this.finTelefono = finTelefono;
    }

    public String getFinCelular() {
        return finCelular;
    }

    public void setFinCelular(String finCelular) {
        this.finCelular = finCelular;
    }

    public String getFinContacto() {
        return finContacto;
    }

    public void setFinContacto(String finContacto) {
        this.finContacto = finContacto;
    }

    public String getFinTfnocontac() {
        return finTfnocontac;
    }

    public void setFinTfnocontac(String finTfnocontac) {
        this.finTfnocontac = finTfnocontac;
    }

    public String getFinCiudad() {
        return finCiudad;
    }

    public void setFinCiudad(String finCiudad) {
        this.finCiudad = finCiudad;
    }

    public String getFinPais() {
        return finPais;
    }

    public void setFinPais(String finPais) {
        this.finPais = finPais;
    }

    public Date getFinFecha() {
        return finFecha;
    }

    public void setFinFecha(Date finFecha) {
        this.finFecha = finFecha;
    }

    public Integer getFinEstado() {
        return finEstado;
    }

    public void setFinEstado(Integer finEstado) {
        this.finEstado = finEstado;
    }

    public Collection<Documento> getDocumentoCollection() {
        return documentoCollection;
    }

    public void setDocumentoCollection(Collection<Documento> documentoCollection) {
        this.documentoCollection = documentoCollection;
    }

    public TipoFinanciador getTipCod() {
        return tipCod;
    }

    public void setTipCod(TipoFinanciador tipCod) {
        this.tipCod = tipCod;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (finCod != null ? finCod.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Financiador)) {
            return false;
        }
        Financiador other = (Financiador) object;
        if ((this.finCod == null && other.finCod != null) || (this.finCod != null && !this.finCod.equals(other.finCod))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "escr.persistencia.Financiador[finCod=" + finCod + "]";
    }

}
